package com.wesley;


import java.sql.*;

/**
 * @author:wesley
 */
public class PhoenixTest {

    public static void main(String[] args) throws ClassNotFoundException, SQLException {
        Class.forName("org.apache.phoenix.jdbc.PhoenixDriver");
        Connection connection = DriverManager.getConnection("jdbc:phoenix:node1:2181");
        PreparedStatement ps = connection.prepareStatement("select * from person");
        ResultSet rs = ps.executeQuery();
        while (rs.next()) {
            System.out.println(rs.getString("name"));
        }
        ps.close();
        connection.close();

    }
}
